#include <cstdio>

#define MAX_SIZE 3001
#define JOLLY "Jolly"
#define NOT_JOLLY "Not jolly"

template <class N>
inline N abs (const N &a)
{
	return a < 0 ? -a : a;
}


inline void clear (bool v[MAX_SIZE])
{
	for (size_t i = 1; i < MAX_SIZE; ++i)
		v[i]  = false;
}


int main ()
{
	int numbers, n1, n2, d, n;
	bool jump[MAX_SIZE], jolly;

	while (scanf ("%d", &numbers) == 1)
	{
		if (numbers == 1)
		{
			scanf ("%*[^\n]");
			puts (JOLLY);
			continue;
		}

		clear (jump);
		jolly = true;
		scanf("%d", &n1);

		for (n = 1; n < numbers; ++n)
		{
			scanf ("%d", &n2);
			d = abs (n1 - n2);
			if (jump[d] || d >= numbers || d < 1)
			{
				jolly = false;
				break;
			}
			jump[d] = true;
			n1 = n2;
		}
		scanf ("%*[^\n]");

		puts (jolly ? JOLLY : NOT_JOLLY);
	}

	return 0;
}